From a17cdcbf5bac5453a7127482761bb3a8129de2ad Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 18 May 2015 10:26:53 -0700 Subject: [PATCH] Use lazyPush() instead of push() in a few places for jobs Change-Id: I56661ea29988e4ee217a63f4c3ffcb78333cc454 --- includes/deferred/HTMLCacheUpdate.php | 2 +- includes/mail/EmailNotification.php | 2 +- includes/page/WikiPage.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/deferred/HTMLCacheUpdate.php b/includes/deferred/HTMLCacheUpdate.php index 79a10e68e7..20e4a4c680 100644 --- a/includes/deferred/HTMLCacheUpdate.php +++ b/includes/deferred/HTMLCacheUpdate.php @@ -55,7 +55,7 @@ class HTMLCacheUpdate implements DeferrableUpdate { $count = $this->mTitle->getBacklinkCache()->getNumLinks( $this->mTable, 100 ); if ( $count >= 100 ) { // many backlinks - JobQueueGroup::singleton()->push( $job ); + JobQueueGroup::singleton()->lazyPush( $job ); JobQueueGroup::singleton()->deduplicateRootJob( $job ); } else { // few backlinks ($count might be off even if 0) $dbw = wfGetDB( DB_MASTER ); diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index 81c4e38d32..5ed52c40ed 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -168,7 +168,7 @@ class EmailNotification { 'pageStatus' => $pageStatus ); $job = new EnotifNotifyJob( $title, $params ); - JobQueueGroup::singleton()->push( $job ); + JobQueueGroup::singleton()->lazyPush( $job ); } else { $this->actuallyNotifyOnPageChange( $editor, diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 914522ffbb..8ef3063906 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2213,7 +2213,7 @@ class WikiPage implements Page, IDBAccessObject { $jobs[] = RecentChangesUpdateJob::newPurgeJob(); } - JobQueueGroup::singleton()->push( $jobs ); + JobQueueGroup::singleton()->lazyPush( $jobs ); } if ( !$this->exists() ) { -- 2.20.1